package com.neuronrobotics.replicator.gui.preview.controller;

import com.neuronrobotics.replicator.gui.stl.GeneralTransform3D.MatrixOrder;

public interface GeneralSTLTransformHelper {
	
	/**
	 * Rotates around x axis without any corrections for current orientation,
	 * or camera position
	 * @param angle
	 */
	public void rotateX(float angle);
	
	/**
	 * Rotates around y axis without any corrections for current orientation,
	 * or camera position
	 * @param angle
	 */
	public void rotateY(float angle);
	
	/**
	 * Rotates around z axis without any corrections for current orientation,
	 * or camera position
	 * @param angle
	 */
	public void rotateZ(float angle);
		
	/**
	 * Translates along x while correcting for current orientation
	 * but not camera position
	 * @param angle
	 */
	public void translateLeftRight(float x);
	
	/**
	 * Translates along z while correcting for current orientation
	 * but not camera position
	 * @param angle
	 */
	public void translateBackForth(float z);
	
	/**
	 * Translates along y while correcting for current orientation
	 * but not camera position
	 * @param angle
	 */
	public void translateUpDown(float y);
	
	/**
	 * Translates on xz plane laterally while correcting for current orientation
	 * and camera position
	 * @param angle
	 */
	public void translateLateral(float y, float[] camPos, float[] camLook);
	
	/**
	 * Translates on xz plane in and out while correcting for current orientation
	 * and camera position
	 * @param angle
	 */
	public void translateInOut(float z, float[] camPos, float[] camLook);
	
	/**
	 * Rotates around y axis correcting for current orientation
	 * @param rad
	 */
	public void rotateAroundUpVector(float rad);
	
	/**
	 * Sets translation to place object on workspace correcting for current orientation
	 * @param workspaceY
	 * @param currMinY
	 */
	public void placeOnWorkspace(float workspaceY, float currMinY);
	
	/**
	 * Sets current transform for the implementation, given the matrix order
	 * of the matrix being given
	 * @param result
	 * @param mo
	 */
	public void setCurrentTransform(float[] result, MatrixOrder mo);
	
	/**
	 * Sets result to the current transform in the MatrixOrder
	 * specified
	 * @param result
	 * @param mo
	 */
	public void getCurrentTransform(float[] result, MatrixOrder mo);
	
	/**
	 * Sets rotation necessary to have given normal pointing down
	 * assuming normal given is not transformed
	 * @param normal
	 */
	public void pointNormalDown(float[] normal);

	/**
	 * Uses current transform to transform the given point
	 * @param point
	 */
	public void transformPoint(float[] point);

	/**
	 * Rotates around y axis correcting for current orientation
	 * and sets an additional translation to keep original center in place
	 * @param d
	 * @parm center
	 */
	public void rotateAroundUpVector(float d, float[] center);

	public void setScale(float scale);

	public float getScale();	

}
